<?php

class karyawan_detil extends CI_Model {

    private $QUERY = "SELECT v.nama_vessel, a.*, b.divisi as divisi_karyawan FROM mt_karyawan a LEFT JOIN mt_divisi b on (a.id_divisi=b.id_divisi) LEFT JOIN master_vessel v on a.id_group_vessel = v.id_vessel";

    public function getDataKaryawanDetil($kode) {
        $conds = " where nik = '" . $kode . "'";
        $resultSet = $this->db->query($this->QUERY . "" . $conds);
        return $resultSet;
    }

    public function getDataKapal(){
        $rs = $this->db->query("select id_vessel,nama_vessel from master_vessel");
        return $rs->result();
    }
}

?>
